<!DOCTYPE html>
<!-- saved from url=(0037)http://127.0.0.1/wx/ybss/zhuce/zc.jsp -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

  <title>店铺管理</title>

  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="format-detection" content="telephone=no, email=no">
  <!--[if IE]>
  <script src="http://127.0.0.1:80/wx/ybss/js/html5shiv.min.js"></script>
  <![endif]-->


  <script type="text/javascript" src="../../script/constants.js"></script>
  <script src="../resource/md5.js"></script>
  <script src="../resource/jquery214.js"></script>
  <script src="../resource/fastclick.js"></script>
  <script src="../resource/jqueryweui.js"></script>
  </script><script src="../resource/picker.js"></script>
  <script src="../../script/api.js"></script>
  <script type="text/javascript" src="../../script/aes.js"></script>
  <script type="text/javascript" charset="UTF-8" src="../../script/naes.js"></script>
  <script type="text/javascript" src="../../script/modeecb.js"></script>
  <script src="../../script/tmd5.js"></script>
  <script>


  </script>

  <style>

   .odiv{
	   display:table;
	   background:#fff;
	   width:100%;
	   padding:5px;
	   border-top:1px solid #E1E1E1; 
	   border-bottom:1px solid #E1E1E1;
   }
   .idiv{
	   float: left;
	   font-size:15px;
	   margin-left: 10px;
	   height:40px;
	   line-height:40px;
   }
   .div_text{
	   float: right;
	   height:40px;
	   line-height:40px;
	   width:50%;
	   color: #8d8d8d;
	   font-size:15px;
	   text-align: right;
	   overflow:hidden;
	   white-space: nowrap; 
	   text-overflow: ellipsis;
	   margin-right:10px;
   }
   .ipt{
     border:none;
     outline:none;
     width:100%;
     font-size:16px;
   }
   .select {
	    padding-top:5px;
	    padding-bottom:5px;
		border: 0;
		appearance:none;
		background: #fff;
		color: #000;
		outline: medium none;
		width:100%;
		height:100%;
		font-size: 16px;
	}
   
   body {
    overflow-x:hidden;
    margin: 0;
   }
   html {
    overflow-x:hidden;
   }
   
   .div_img{
       float: left;
       width: 30%;
       text-align: center;
       height: 180px;
       line-heigth: 180px;
    }
      .al-toggle-button{
        appearance: none;
        -webkit-appearance: none;
        position: relative;
        width: 52px;
        height: 32px;
        background: #dfdfdf;
        border-radius: 16px;
        border: 1px solid #dfdfdf;
        outline: 0;
        box-sizing: border-box;
    }
    .al-toggle-button:checked{
        border-color: #04be02;
        background-color: #04be02;
    }
    .al-toggle-button:before, .al-toggle-button:after{
        content: " ";
        position: absolute;
        top: 0;
        left: 0;
        height: 30px;
        border-radius: 15px;
        transition: transform 0.3s;
        transition: -webkit-transform 0.3s;
        transition: transform 0.3s, -webkit-transform 0.3s;
        -webkit-transition: -webkit-transform 0.3s;
    }
    .al-toggle-button:before{
        width: 50px;
        background-color: #fdfdfd;
    }
    .al-toggle-button:after{
        width: 30px;
        background-color: white;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    }
    .al-toggle-button:checked:before{
        transform: scale(0);
        -webkit-transform: scale(0);
    }
    .al-toggle-button:checked:after{
        transform: translateX(20px);
        -webkit-transform: translateX(20px);
    }
  </style>

</head>

<body style="background:url(../../image/bj.png) repeat-x 0;background-size:100%;">
<div style="background:url(../../image/mainbg.png) no-repeat right 0 bottom 0%;">
<div>
       <header id="statusBar">
		<div style="width:100%;display:table;background: #fff;position:fixed;border-bottom:1px solid #EAEAEA;z-index: 9999;height: 50px;" >
			<div style="float:left;width: 20%;height: 50px;line-height: 50px;" tapmode="presshover" onclick="api.closeWin();">
			  <div style="float:left;width: 30%;height: 50px;">
			   <img style="width: 24px;margin-top: 13px;" src="../../image/blc_back.png" />
			   </div>
			   <div style="float:left;width: 50%;">
			   返回
			   </div>
			</div>
			<div style="float:left;width: 60%;height: 50px;line-height: 50px;text-align: center;font-weight:bold;">
			 店铺管理
			</div>
		</div>
	  </header>
          <div style="height:70px"></div>
          <div style="width:100%;height:180px;background:url(../../image/jhzf/storeBg.jpg) no-repeat fixed;background-size:100% 100%;padding-left: 5%;padding-right: 5%;">
            <div class = "div_img">
              <div style="height: 20px;margin-top: 15px;margin-bottom: 5px;"></div>
              <div style="position: relative;top: 30%;transform: translateY(-50%);">
              <div style="width: 80px;height: 64px;margin: 0 auto;vertical-align: middle;">
              <img src="../../image/jhzf/up.png" style="width: 100%;height: 100%;"/>
              </div>
              <div style="color: #fff;">已开通</div>
              </div>
            </div>
            <div class = "div_img">
              <div style="height: 20px;margin-top: 15px;margin-bottom: 5px;color: #fff;" id="headerstoreName"></div>
              <div style="position: relative;top: 30%;transform: translateY(-50%);">
              <div style="width: 64px;height: 64px;margin: 0 auto;vertical-align: middle;">
              <img src="../../image/jhzf/wxc.png" style="width: 100%;height: 100%;"/>
              </div>
              <div style="color: #fff;">未开通</div>
              </div>
            </div>
            <div class = "div_img">
              <div style="height: 20px;margin-top: 15px;margin-bottom: 5px;"></div>
              <div style="position: relative;top: 30%;transform: translateY(-50%);">
              <div style="width: 64px;height: 64px;margin: 0 auto;vertical-align: middle;">
              <img src="../../image/jhzf/zfbc.png" style="width: 100%;height: 100%;"/>
              </div>
              <div style="color: #fff;">未开通</div>
              </div>
            </div>
          </div>
          <div style="display: none;" class='odiv' tapmode="presshover" onclick="uiEdit();">  
          <div class='idiv'>微信/支付宝</div>
          <div style="float: right;height:32px;line-height:32px;height:100%;32px;">
            <img src='../../image/timg.png' style="width:50%;vertical-align: middle;"/>
          </div>
          <div class="div_text" id="wz">
          </div>
          </div>
          
          <div class='odiv'>  
          <div class='idiv'>店铺名称</div>
          <div style="float: right;height:32px;line-height:32px;height:100%;width: 32px;">&nbsp;</div>
          <div class="div_text" id="storeName">
          </div>
          </div>
          
          <div class='odiv' tapmode="presshover" onclick="updateAddr();">  
          <div class='idiv'>店铺地址</div>
          <div style="float: right;height:32px;line-height:32px;height:100%;width: 32px;">
            <img src='../../image/timg.png' style="width:50%;vertical-align: middle;"/>
          </div>
          <div class="div_text" id="storeAddr">
          </div>
          </div>
          
          <div class='odiv' tapmode="presshover" onclick="storeCertification();">  
          <div class='idiv' id="storeCret">店铺认证<font style="font-size: 14px;color: #FF0000;">(未认证)</font></div>
          <div style="float: right;height:32px;line-height:32px;height:100%;width: 32px;">
            <img src='../../image/timg.png' style="width:50%;vertical-align: middle;"/>
          </div>
          <div class="div_text" id="storeAuth">
          </div>
          </div>

          <div style="height:10px"></div>
          
          <div class='odiv'>  
          <div class='idiv'>店铺编号</div>
          <div style="float: right;height:32px;line-height:32px;height:100%;width: 32px;">&nbsp;</div>
          <div class="div_text" id="storeNo">
          </div>
          </div>
          
          <div class='odiv'>  
          <div class='idiv'>持卡人姓名</div>
          <div style="float: right;height:32px;line-height:32px;height:100%;width: 32px;">&nbsp;</div>
          <div class="div_text" id="cardOwn">
          </div>
          </div>
          
          <div class='odiv'>  
          <div class='idiv'>预留手机</div>
          <div style="float: right;height:32px;line-height:32px;height:100%;width: 32px;">&nbsp;</div>
          <div class="div_text" id="phone">
          </div>
          </div>
          
          <div class='odiv' tapmode="presshover" onclick="idcardCertification();">  
          <div class='idiv' id="idcardCret">身份证号<font style="font-size: 14px;color: #FF0000;">(未认证)</font></div>
          <div style="float: right;height:32px;line-height:32px;height:100%;width: 32px;">
            <img src='../../image/timg.png' style="width:50%;vertical-align: middle;"/>
          </div>
          <div class="div_text" id="idCard">
          </div>
          </div>
          
          <div class='odiv'>  
          <div class='idiv'>银行卡号</div>
          <div style="float: right;height:32px;line-height:32px;height:100%;width: 32px;">&nbsp;</div>
          <div class="div_text" id="cardNo">
          </div>
          </div>
          
          <div class='odiv'>  
          <div class='idiv'>发卡行行号</div>
          <div style="float: right;height:32px;line-height:32px;height:100%;width: 32px;">&nbsp;</div>
          <div class="div_text" id="bankNo">
          </div>
          </div>
          <div style="height:10px"></div>
          <div class='odiv' tapmode="presshover" onclick="queryLimit();">  
          <div class='idiv'>查询限额</div>
          <div style="float: right;height:32px;line-height:32px;height:100%;width: 32px;">
            <img src='../../image/timg.png' style="width:50%;vertical-align: middle;"/>
          </div>
          </div>
          <div class='odiv' tapmode="presshover" onclick="historyRecord();">  
          <div class='idiv'>历史纪录</div>
          <div style="float: right;height:32px;line-height:32px;height:100%;width: 32px;">
            <img src='../../image/timg.png' style="width:50%;vertical-align: middle;"/>
          </div>
          </div>
          <div class='odiv' tapmode="presshover">  
          <div class='idiv'>短信通知</div>
          <div style="float: right;height:32px;line-height:32px;">
            <input type="checkbox" class="al-toggle-button" id="smsNotf" style="margin-right:20px;" tapmode="presshover" onclick="openSms();"> 
          </div>
          </div>
          
</div>
			<div style="bottom:0;margin-top: 20px;width:100%;height:50px;text-align: center;">四川航天信息有限公司</div>
</div>		

<script>
    var merLimit = '';
    var merid = "";
    var name = "";
    var idcard = "";
    var addr = "";
	apiready = function(){
	    if(api.systemType == "ios"){
		   document.getElementById("statusBar").style.background = "#298cb4";
		}
	    $api.fixStatusBar( $api.dom('header') );
	    api.addEventListener({
			name: 'updateAddr'
		}, function(ret, err) {
			window.location.reload();
		});
	   var uiId;
       var UILoading = api.require('UILoading');
		UILoading.flower({
		    center: {
		        x: api.winWidth/2.0,          
		        y: api.winHeight/2.0 
		    },
		    size: 30,
		    mask: "rgba(0,0,0,0.5)",
		    fixed: true
	   }, function(ret) {
		    uiId = ret.id;
	   });
	   merid = api.pageParam.merid;
	   api.parseTapmode();
	   merid = api.pageParam.merid;
	   $api.setStorage("merid",merid);
       var callback = function(ret, err){
            UILoading.closeFlower({
			    id: uiId
			});
			if(ret){
			    $("#headerstoreName").html(ret.MERNAME);
		        $("#storeName").html(ret.MERNAME);
		        $("#storeAddr").html(ret.MERADDRESS);
		        $("#storeNo").html(ret.MERID);
		        $("#cardOwn").html(ret.CUSTOMERNM);
		        $("#phone").html(ret.PHONENO);
		        $("#idCard").html(ret.CERTIFID);
		        $("#cardNo").html(ret.ACCNO);
		        $("#bankNo").html(ret.bankNo);
		        name = ret.CUSTOMERNM;
		        idcard = ret.idcardNo;
		        addr = ret.MERADDRESS;
		        merLimit = ret.merLimit;
		        if(ret.merLvl == "03"){
		            $("#storeCret").html("店铺认证");
		            $("#idcardCret").html("身份证号");
		        }
		        if(ret.merLvl == "02"){
		           $("#idcardCret").html("身份证号");
		        }
		        //短信通知
		        if(ret.SMSNOTF == 1){
		          document.getElementById("smsNotf").checked = true;
		        }else{
		          document.getElementById("smsNotf").checked = false;
		        }
	        }else{
	            api.alert({msg: JSON.stringify(err)});
	        }
	   }
	   var content = {"merid":merid};
	   apiAjax(JSON.stringify(content),url.queryStore,callback);
	}
	
	function historyRecord(){
	    api.openWin({
	        name: 'history',
	        url: 'history.html',
	        pageParam: {
					merid : merid
			}
        });
	}
	
	//修改地址
	function updateAddr(){
	    api.openWin({
	        name: 'updateAddr',
	        url: 'updateAddr.html',
	        pageParam: {
					merid : merid,
					addr : addr
				}
        });
	}
	
	//身份认证
	function idcardCertification(){
		var a = $("#cardOwn").html();
	    var b = $("#idCard").html();
	    api.openWin({
	        name: 'idcardCertification',
	        url: 'idcardCertification.html',
	        pageParam: {
					merid : merid,
					name : name,
					idcardNo : idcard
				}
        });
	}
	
	//店铺认证
	function storeCertification(){
	    api.openWin({
	        name: 'storeCertification',
	        url: 'storeCertification.html',
	        pageParam: {
					merid : merid
				}
        });

	}
	
	function openSms(){
	  if($("input[id='smsNotf']").is(':checked') == false){
		    var callback = function(ret, err){
		        console.log(JSON.stringify(ret));
		    }
		    var content = {"merid":merid,"value":1};
		    apiAjax(JSON.stringify(content),url.updateNotf,callback);
	  }else{
	        var callback = function(ret, err){
		        console.log(JSON.stringify(ret));
		    }
		    var content = {"merid":merid,"value":0};
		    apiAjax(JSON.stringify(content),url.updateNotf,callback);
	  }
	}
	
	//查询限额
	function queryLimit(){
	    api.openWin({
	        name: 'queryLimit',
	        url: 'queryLimit.html',
	        pageParam: {
					merLimit : merLimit
				}
        });
	}
	
</script>



</body></html>
